﻿using SIR.Common;
using SIR.Entities.Interfaces;

namespace SIR.Entities.Implementations
{
	/// <summary>
	/// Represents a user's web session for authentication
	/// </summary>
	public class SirSession : Entity, ISirSession
	{
		/// <summary>
		/// Creates a new SirSession object with a default of -1 for unauthenticated users
		/// </summary>
		public SirSession()
			: base()
		{
			UserId = -1;
		}
		/// <summary>
		/// Gets or sets the identifier for the user for the session
		/// </summary>
		[DatabaseAccess(DatabaseAccessRights.ReadWrite)]
		public long UserId { get; set; }
		/// <summary>
		/// Gets or sets the session Id used within the Request/Response cookies
		/// </summary>
		[DatabaseAccess(DatabaseAccessRights.ReadWrite)]
		public string SessionId { get; set; }
	}
}
